<template>
  <div class="login-container-box">
      <div class="h-full">
        <!-- <PcLogin v-if="!isMobile && !isTablet" /> -->

        <MobileLogin  />
      </div>
  </div>
</template>
<script lang="ts" setup>
import { computed } from 'vue'
import { useDesign } from '@/hooks/web/useDesign'
import { useDeviceDetect } from '@/hooks/web/useDeviceDetect'
import PcLogin from './components/PcLogin.vue'
import MobileLogin from './components/MobileLogin.vue'
defineOptions({ name: 'Login' })

const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('login')

// 使用设备检测 hook，设置移动端断点为 768px
const { isMobile, isTablet, isPortrait, deviceInfo } = useDeviceDetect(768)

// 根据设备类型显示不同的标题
const getLoginTitle = computed(() => {
  if (deviceInfo.value.userAgent.includes('micromessenger')) {
    return '微信登录'
  }
  if (deviceInfo.value.userAgent.includes('alipay')) {
    return '支付宝登录'
  }
  return '用户登录'
})
</script>

<style lang="scss" scoped>
$prefix-cls: #{$namespace}-login;

.#{$prefix-cls} {
  overflow: auto;

  &__left {
    &::before {
      position: absolute;
      top: 0;
      left: 0;
      z-index: -1;
      width: 100%;
      height: 100%;
      background-image: url('@/assets/imgs/login/bg.png');
      background-position: center;
      background-repeat: no-repeat;
      content: '';
    }
  }
}
</style>

<style lang="scss">



.dark .login-form {
  .el-divider__text {
    background-color: var(--login-bg-color);
  }

  .el-card {
    background-color: var(--login-bg-color);
  }
}
</style>


<style lang="scss" scoped>

.login-container-box {
  height: 100vh;
  height: 100%;
}


</style>
